/*
 * Copyright (c) gitee.com/jiandong001.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

import { YogaLogger } from './YogaLogger';
import { YogaExperimentalFeature } from './YogaExperimentalFeature'
/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */


export abstract class YogaConfig {

  public static readonly SPACING_TYPE = 1;

  public abstract setExperimentalFeatureEnabled(feature: YogaExperimentalFeature, enabled: boolean): void;

  public abstract setUseWebDefaults(useWebDefaults: boolean): void;

  public abstract setPrintTreeFlag(enable: boolean): void;

  public abstract setPointScaleFactor(pixelsInPoint: number): void;
  /**
   * Yoga previously had an error where containers would take the maximum space possible instead of the minimum
   * like they are supposed to. In practice this resulted in implicit behaviour similar to align-self: stretch;
   * Because this was such a long-standing bug we must allow legacy users to switch back to this behaviour.
   */
  public abstract setUseLegacyStretchBehaviour(useLegacyStretchBehaviour: boolean): void;

  /**
   * If this flag is set then yoga would diff the layout without legacy flag and would set a bool in
   * YogaNode(mDoesLegacyStretchFlagAffectsLayout) with true if the layouts were different and false
   * if not
   */
  public abstract setShouldDiffLayoutWithoutLegacyStretchBehaviour(
      shouldDiffLayoutWithoutLegacyStretchBehaviour: boolean): void;

  public abstract setLogger(logger: YogaLogger): void;

  public abstract getLogger(): YogaLogger;

  abstract getNativePointer() :number; // long
}
